package shortestpath.astar.node;

import shortestpath.Node;

public interface OpenNode<T extends Node> extends WeightedNode, ListedNode<T> {

	static class OpenNodeImpl<T extends Node> extends AbstractListedNode<T>
			implements
				OpenNode<T> {
		final int weight;

		OpenNodeImpl(T node, ListedNode<T> predecessor, int weight) {
			super(node, predecessor);
			this.weight = weight;
		}

		@Override
		public int getWeight() {
			return this.weight;
		}
	}
}